<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOmsDownLoadLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('el_oms_download_log', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type')->nullable(); //同步数据类型：orders 订单数据;refund 退换货数据；store 库存数据
            $table->string('path')->nullable(); //文件保存路径
            $table->string('remote')->nullable();   //FTP服务器文件名称 Order/dd.sh
            $table->mediumText('message')->nullable(); //详细信息
            $table->tinyInteger('status')->default(1);  //下载文件状态 1:成功  2：失败
            //其他待补充字段
            $table->timestamps();

            $table->index('remote');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('el_oms_upload_log');
    }
}
